Class CloudImpl

All Implemented Interfaces:
IPCObject, Cloud, Device

public class CloudImpl extends DeviceImpl implements Cloud
Information provided by the PKI file:

    \class Cloud
    
    \brief Cloud is a cloud device.
    
    \example network().getDevice("Cloud0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • addPhoneConnection

      public boolean addPhoneConnection(String number, String portName)
      Information provided by the PKI file:
      
          \brief Associates a phone number to a port.
          
          \param number, the telephone number. The format is 5551239999.
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addPhoneConnection in interface Cloud
      Parameters:
      number - Takes in a parameter of number
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • removePhoneConnection

      public void removePhoneConnection(String number)
      Information provided by the PKI file:
      
          \brief Removes the phone number from the port.
          
          \param number, the telephone number to remove.
          
              
      Specified by:
      removePhoneConnection in interface Cloud
      Parameters:
      number - Takes in a parameter of number
    • addSubLinkConnection

      public boolean addSubLinkConnection(String portName1, String subLinkName1, String portName2, String subLinkName2)
      Information provided by the PKI file:
      
          \brief Adds a sublink connection between the two specified ports.
          
          \param portName1,   portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          \param subLinkName1, the name of the sublink associated to portName1.
          \param portName2, see portName1 description.
          \param subLinkName1, the name of the sublink associated to portName2.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addSubLinkConnection in interface Cloud
      Parameters:
      portName1 - Takes in a parameter of portName1
      subLinkName1 - Takes in a parameter of subLinkName1
      portName2 - Takes in a parameter of portName2
      subLinkName2 - Takes in a parameter of subLinkName2
      Returns:
      boolean Returns a boolean
    • removeSubLinkConnection

      public boolean removeSubLinkConnection(String portName, String subLinkName)
      Information provided by the PKI file:
      
          \brief Removes the sublink connection.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          \param subLinkName, the name of the sublink associated to portName.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeSubLinkConnection in interface Cloud
      Parameters:
      portName - Takes in a parameter of portName
      subLinkName - Takes in a parameter of subLinkName
      Returns:
      boolean Returns a boolean
    • addPortConnection

      public boolean addPortConnection(String portName1, String portName2)
      Information provided by the PKI file:
      
          \brief Adds the port connection.
          
          \param portName1,   portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          \param portName2, see portName1 description.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addPortConnection in interface Cloud
      Parameters:
      portName1 - Takes in a parameter of portName1
      portName2 - Takes in a parameter of portName2
      Returns:
      boolean Returns a boolean
    • removePortConnection

      public boolean removePortConnection(String portName)
      Information provided by the PKI file:
      
          \brief Removes the port connection.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removePortConnection in interface Cloud
      Parameters:
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • removeAllPortConnection

      public boolean removeAllPortConnection(String portName)
      Information provided by the PKI file:
      
          \brief Removes all port connections.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeAllPortConnection in interface Cloud
      Parameters:
      portName - Takes in a parameter of portName
      Returns:
      boolean Returns a boolean
    • setDslConnection

      public boolean setDslConnection(String portName, boolean bDSL)
      Information provided by the PKI file:
      
          \brief Sets the DSL or cable connection.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          \param bDsl, true for DSL connection, false for cable connection.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      setDslConnection in interface Cloud
      Parameters:
      portName - Takes in a parameter of portName
      bDSL - Takes in a parameter of bDSL
      Returns:
      boolean Returns a boolean
    • getSubLinkConnectionCount

      public int getSubLinkConnectionCount()
      Information provided by the PKI file:
      
          \brief Return the number of sublink connection.
          
          \return int, number of sublink connection
          
              
      Specified by:
      getSubLinkConnectionCount in interface Cloud
      Returns:
      int Returns a int
    • getSubLinkConnectionAt

      public Pair<CloudSubLink,CloudSubLink> getSubLinkConnectionAt(int index)
      Information provided by the PKI file:
      
          \brief Return the Sublink Connection at an index
          
          \param index, the index location in the queue of the desired sublink connection
          
          \return pair<CloudSubLink, CloudSubLink>, from and to sublink pair
          
              
      Specified by:
      getSubLinkConnectionAt in interface Cloud
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Pair<CloudSubLink, CloudSubLink> Returns a Pair<CloudSubLink, CloudSubLink>
    • getPortConnectionCount

      public int getPortConnectionCount()
      Information provided by the PKI file:
      
          \brief Return the number of port connections.
          
          \return int, number of port connection
          
              
      Specified by:
      getPortConnectionCount in interface Cloud
      Returns:
      int Returns a int
    • getPortStrConnections

      public List<String> getPortStrConnections()
      Information provided by the PKI file:
      
          \brief Return a list of connection with port names
          
          \return vector<string>, list of connection with port names
          
              
      Specified by:
      getPortStrConnections in interface Cloud
      Returns:
      List<String> Returns a List<String>
    • isDslConnection

      public boolean isDslConnection(String portname)
      Information provided by the PKI file:
      
          \brief Check if the port is used in a Dsl Connection
          
          \return vector<string>, list of connection with port names
          
              
      Specified by:
      isDslConnection in interface Cloud
      Parameters:
      portname - Takes in a parameter of portname
      Returns:
      boolean Returns a boolean
    • removeSubLinkConnectionAt

      public void removeSubLinkConnectionAt(int index)
      Information provided by the PKI file:
      
          \brief Remove sublink connection at an index
          
          \param index, the index at which the sublink connection should be removed
          
          \return none
          
              
      Specified by:
      removeSubLinkConnectionAt in interface Cloud
      Parameters:
      index - Takes in a parameter of index
    • getSubLinkConnectionInfo

      public List<String> getSubLinkConnectionInfo()
      Information provided by the PKI file:
      
          \brief Get Sublink Connection Info  (from port, from sublink, to port, to sublink)
          
          \return vector<string>, list of sublink connection info in string format
          
              
      Specified by:
      getSubLinkConnectionInfo in interface Cloud
      Returns:
      List<String> Returns a List<String>
    • getHardwareQueueCount

      public int getHardwareQueueCount()
      Information provided by the PKI file:
      
          \brief Get the number of hardware queue
          
          \return int, number of hardware queue
          
              
      Specified by:
      getHardwareQueueCount in interface Cloud
      Returns:
      int Returns a int
    • getHardwareQueueAt

      public HardwareQueue getHardwareQueueAt(int index)
      Information provided by the PKI file:
      
          \brief Remove hardware queue at an index
          
          \param index, the index at which the hardware queue is at
          
          \return HardwareQueue, HardwareQueue object
          
              
      Specified by:
      getHardwareQueueAt in interface Cloud
      Parameters:
      index - Takes in a parameter of index
      Returns:
      HardwareQueue Returns a HardwareQueue